Audio Switch Buttons


CLASS FILES: switchbau.class, iloader.class, occcolor.class
TOTAL SIZE: 12K
NOTICE TAG: "Audio Buttons Links, Copyright (c) 1997 OpenCube Technologies, Registered (Unique Key ID#)"

 

Notes Regarding Java

Note: Some versions of Internet Explorer (primarily the pre beta 4.0) will not be able to view this and most other image based applets locally. If this is the case you must place the applet on a web server in order to view it. This bug will not be present for viewers of the applet once the program is on the internet, it is a local issue only.

Note: When uploading your class files and HTML document to the sever make certain that the class files are uploaded in binary format and the codebase value in the applet tag appropriately point to the location of the class file (If the class file is in the same folder as the HTML document containing the applet leave the codebase command out of the applet tag).

Note: Due to a bug in Netscape and IE, Gif Images can sometimes be rendered inappropriately depending on the the platform and browser being used. Netscape typically displays the gif image with a spotty effect. Jpg images will work under all browsers and platforms and are recommended for use with this applet.

 

Applet Tag Template:

 

Online Documentation at www.opencube.com

 

The Required Parameters:

Parameter 1, the notice tag, must be included in the applet tag in order for the applet to work. The only other required parameters are at least one image file and highlight image parameter. Usually the easiest way to customize your applet is to cut and paste the applet tag used in the template and modify it to fit your web page.

 

Color Definition:

This applet uses a simple RGB color scheme. To define a color in one of the color parameters use a value between 0 - 255 for the red, green, and blue components separated by commas and typed out in the correct r,g,b order. Below is a sample of how a color parameter should look, the example specifies several different sample colors for the "bgcolor" parameter.

WHITE: <param name="bgcolor" value="255,255,255">
GREEN: <param name="bgcolor" value="0,255,0">
BLACK: <param name="bgcolor" value="0,0,0">
YELLOW: <param name="bgcolor" value="255,255,0">
OFF WHITE: <param name="bgcolor" value="240,239,234">

The best way to choose the exact color you are looking for without having to guess the numbers is to access your systems Color Picker. Color Pickers usually allow you to drag the mouse over a rainbow type color grid to select a color, and show you the appropriate RGB values. In windows the Color Picker is accessible through MS Paint as well as a majority of the popular Imaging and HTML Authoring Software.

 

Defining Multiple attributes with One Parameter:

Single parameters used to customize more than one item such as specific images or messages are done so using a range, such as "imagefile0" - "imagefileN". To define a parameter for a specific item (available when noted as above), use "imagefile0" to define, in this case, the location of the first image file - "imagefile1" would define the second image file to display, etc., etc.

 

The Applet Coordinate System:

The origin of the applets coordinate system is located at the upper left corner of the applet. The x (horizontal) coordinate starts at the left border with 0 and goes as far to the right as the applet is wide (defined with the width tag - see above). The y (vertical) coordinate starts at the top of the applet with 0 and goes down as far as the applet is high (defined with the height tag - see above).

 

The Applet Parameters

 

The Applet

Parameter 1
Attribute: Copyright notice.
param name="Notice"
value="Audio Buttons Links, Copyright (c) 1997 OpenCube Technologies, Registered (Unique Key ID#)"
Note: This must be included for the applet to work.

Parameter 2
Attribute: Applet Background Color
param name = "bgcolor"
Value = R,G,B, Where R,G,B are the red, green, and blue components of the applets background color.
DEFAULT: White

Parameter 3
Attribute: Status bar text when the mouse is over the applet.
param name = "onsbtext"
Value = X, Where X is the message to be displayed in the status bar when the mouse is over the applet area.
DEFAULT: "OpenCube - Switch Buttons"

Parameter 4
Attribute: Status bar text when the mouse is not on applet.
param name = "offsbtext"
Value = X, Where X is the message to be displayed in the status bar when the mouse is located outside of the applet area.
DEFAULT: "Java by OpenCube"

Parameter 5
Attribute: Show URL Links in Status Bar
param name = "showsblinks"
Value = true or false, Where true = yes, show URL link names in the status bar, false = no don not display URL links in the status bar.
DEFAULT: true

Parameter 6
Attribute: Highlight Image Only When Directly Over Image
param name = "honimageonly"
Value = true or false, Where true = yes, highlight the image only when the mouse is directly over the image. False = no, do not undo the previous image highlighting until the mouse is located aver a new image.
DEFAULT: false

Parameter 7
Attribute: Sun Audio File to play on Mouse Over
param name = "aufile"
Value = X, Where X is the name and location of the audio file to play when the mouse moves over an image. The audio file must be in Sun AU format and capable referenced relative to the document containing the applet.
DEFAULT: false

 

The Images & Image Placement

Parameter 8
Attribute: Image File Locations and Names
param name = "imagefile0" - "imagefileN"
Value = X. Where X is the relative location and name of the image file to be displayed in the applet area as a main menu image. This must be defined relative to the location of the HTML document which contains the applet.

Parameter 9
Attribute: Image x (horizontal) locations
param name = "picx0" - "picxN"
Value = X. Where X is the horizontal location of the left border of the image relative to the left margin of the applet. If your applet width is defined as 100, picx="50" would place the left border of the image horizontally dead center.

Parameter 10
Attribute: Image y (vertical) locations
param name = "picy0" - "picyN"
Value = X. Where X is the vertical location of the top border of the image relative to the top of the applet.

 

The Highlighted Images

Note: The images defined as Highlight images appear as the mouse moves over a main menu image. The highlighted images are automatically placed directly over the main menu image to which they correspond and therefore should have the same dimensions as their associated main menu images.

Parameter 11
Attribute: Image File Locations and Names
param name = "switchfile0" - "switchfileN"
Value = X. Where X is the relative location and name of the image file to be displayed in the applet area when the mouse is over a main menu image. This must be defined relative to the location of the HTML document which contains the applet.

 

URL Links

Parameter 12
Attribute: Image URL Links
param name = "imagedesturl0" - "imagedesturlN"
value=X, where X is the link for the specific image. URL's can be defined relative to the HTML document containing the applet or fully qualified.

Parameter 13
Attribute: Specific Load Destination Image URL Where?
param name="imageloadwhere0" - "imageloadwhereN"
The "imageloadwhereN" tag specifies where the document specified in the "URL" value should be loaded. The default is "_self". A value equal to the name (case sensitive) of a frame will load the document in that frame.

"_parent" show in the parent frame
"_top" show in the top-most frame
"_self" show in the current frame
"_blank" show in a new unnamed top-level window
"name" show in a new top-level window named name
"frame name" show in the frame named frame name

Note: When targeting a frame location with the name of the frame make certain that the case and names are typed identically. If the applet cannot find the frame the document will be loaded in a new window.

Parameter 14
Attribute: Default Load Destination URL Where?
param name="loadwhere0-0" - "loadwhereN-N"
The "loadwhere" tag specifies where the document specified in the "URL" value should be loaded. The default is "_self". A value equal to the name (case sensitive) of a frame will load the document in that frame.

"_parent" show in the parent frame
"_top" show in the top-most frame
"_self" show in the current frame
"_blank" show in a new unnamed top-level window
"name" show in a new top-level window named name
"frame name" show in the frame named frame name

Note: When targeting a frame location with the name of the frame make certain that the case and names are typed identically. If the applet cannot find the frame the document will be loaded in a new window.


OpenCube

Audio Switch Buttons, © 1996, OpenCube Technologies